-
Notifications
You must be signed in to change notification settings - Fork 433
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Patchinfo tests #3160
Patchinfo tests #3160
Conversation
The generation of the package link was failing calling patchinfo_bread_crumb in the helper spec. Thus I changed this in the helper. ==== ActionController::UrlGenerationError: No route matches {:action=>"show", :package=>"package_1", :project=>"project_1"}
Codecov Report
@@ Coverage Diff @@
## master #3160 +/- ##
==========================================
+ Coverage 88.93% 88.93% +<.01%
==========================================
Files 263 263
Lines 17591 17587 -4
==========================================
- Hits 15644 15641 -3
+ Misses 1947 1946 -1
|
@@ -41,7 +41,10 @@ | |||
- if @issues.present? | |||
%ul | |||
- @issues.each do |issue| | |||
= issue_link(issue) | |||
- if issue[0] == "CVE" | |||
= content_tag(:li, link_to((issue[1]).to_s, issue[2]) + ": #{issue[3]}") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why content_tag?, and not something like %li= link_to((issue[1]).to_s, issue[2]) + ": #{issue[3]}"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point. Didn't think of that
- if issue[0] == "CVE" | ||
= content_tag(:li, link_to((issue[1]).to_s, issue[2]) + ": #{issue[3]}") | ||
- else | ||
= content_tag(:li, link_to("#{issue[0]}##{issue[1]}", issue[2]) + ": #{issue[3]}") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same here
Nice work! |
The code is only used once and not very complex. No need to have it in a helper.
@DavidKang Changed it now |
No description provided.